package net.cloudcodex.client.home.view.panel.header;

import net.cloudcodex.client.home.view.HomeView.Message;

import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;

public class HomeHeaderPanel extends FlowPanel {

	private Label welcomeLbl;
	private String nickname;
	private Message message;

	public HomeHeaderPanel() {
		initComponents();
	}

	private void initComponents() {

		this.setStyleName("homeHeaderPanel");
		HorizontalPanel welcomePanel = new HorizontalPanel();
		welcomePanel.setStyleName("welcomePanel");
		welcomeLbl = new Label();
		welcomeLbl.setStyleName("welcomeLabel");
		welcomePanel.add(welcomeLbl);
		this.add(welcomePanel);
	}

	public void addNickName(String nickname) {
		this.nickname = nickname;
		welcomeLbl.setText("Welcome " + nickname);

	}

	public void setMessage(Message message) {
		this.message = message;
		
	}
	
}
